Documentation for Users
1.0.2
Perception Toolbox for Virtual Reality (PTVR) Manual

It is often very convenient for scientists to apply some coordinate transformations before placing objects in 3D.
However, coordinate transformations can be sometimes painful for nonmathematicians. PTVR offers some features whose aim is to reduce such pain for several common experimental situations as detailed in the present page.
Figure 1: 'Simple derivation of the Lorentz transformation by improvement of the intuitive Voigt transformation'. (😉Verbatim from Mattcomm, CC BYSA 4.0, via Wikimedia Commons).
PTVR provides functions to easily perform translations and rotations of coordinate systems in the following way (translations and rotations are part of rigid transformations  see Definitions below):
At any moment in a PTVR script, there is a CURRENT coordinate system that is used by all subsequent relevant fonctions. This CURRENT coordinate system (say CS1) is used until a new rigid transformation is applied, thus leading to a new coordinate system (say CS2) that becomes the current coordinate system..
At the beginning of the script, the CURRENT coordinate system is the GLOBAL coordinate system (aka World coordinate system).
There are two kinds of PTVR functions to create a NEW coordinate system as detailed in the two following subsections:
1/ functions that use the GLOBAL coordinate system (aka World coordinate system) to define the coordinates of the transformation vector (translation or rotation) and to apply the transformation.
2/ functions that use the CURRENT coordinate system to define the coordinates of the transformation vector (translation or rotation) and to apply the transformation.
... rigid transformations include rotations, translations, reflections, or any sequence of these. Reflections are sometimes excluded from the definition of a rigid transformation by requiring that the transformation also preserve the handedness of objects in the Euclidean space. (A reflection would not preserve handedness; for instance, it would transform a left hand into a right hand.) ....
Any object will keep the same shape and size after a proper rigid transformation.
(Wikipedia contributors, 'Rigid transformation').
 
Figure 2: A translation moves every point of a figure or a space by the same amount in a given direction. Image from Fred the Oyster, CC BYSA 4.0, via Wikimedia Commons.  Figure 3: An xyCartesian coordinate system rotated through an angle theta to an x′y′Cartesian coordinate system. Image from Guy vandegrift, CC BYSA 3.0, via Wikimedia Commons. 
Several scripts in: PTVR_Researchers\Python_Scripts\Demos\Coordinate_Systems\
Several scripts in: PTVR_Researchers\Python_Scripts\Demos\Screens\